package oop.java0328.work1;

public class UITeacher extends Teacher {
    private String major;

    public UITeacher(String major) {
        this.major = major;
    }

    public UITeacher(String name, int age, int workYear, String gender, String major) {
        super(name, age, workYear, gender);
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    //绘制图像
    public void capacity() {
        System.out.println("绘制图像");
    }

    @Override
    public void giveLession() {
        System.out.println("上课使用" + major + "上课");
    }
}
